a5da36fdaedbf0dc9c685bbdd465771cfb1c2597,src/main/java/com/stewsters/util/pathing/twoDimention/pathfinder/AStarPathFinder2d.java,AStarPathFinder2d,isValidLocation,#Mover2d#number#number#number#number#,216
Before Change
* @return True if the location is valid for the given mover
*/
protected boolean isValidLocation(Mover2d mover, int sx, int sy, int x, int y) {
boolean invalid = (x < 0) || (y < 0) || (x >= map.getXSize()) || (y >= map.getYSize());
if ((!invalid) && ((sx != x) || (sy != y))) {
invalid = map.isBlocked(mover, nodes[x][y]);
}
return !invalid;
}
}
After Change
* @param y The y coordinate of the location to check
* @return True if the location is valid for the given mover
*/
protected boolean isValidLocation(Mover2d mover, int sx, int sy, int x, int y) {
if ((x < 0) || (y < 0) || (x >= map.getXSize()) || (y >= map.getYSize())) {
return false;
}
return mover.canTraverse(nodes[x][y]);
}
}